import os
from google.appengine.ext.webapp import template
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
import logging

from controller.register import *

# for attr in ('stdin', 'stdout', 'stderr'):
#     setattr(sys, attr, getattr(sys, '__%s__' % attr))
# import pdb
# pdb.set_trace()
# logging.debug(str(sys.path))
#sys.path.append("/Users/Ryan/Documents/Computer Programs/CSE 110/Python_version/public")


#webapp.template.register_template_library('templatetags.userinfo')


"""
This is the URL handling. You can use regexes for the urls to match on.
Second parameter is the View to run. Views are located in /views/. Dont forget to 
import the file that the view you want is located in.
"""
application = webapp.WSGIApplication([('/register', Register)], debug=True)

def main():
  # Start the main site
  run_wsgi_app(application)
  
if __name__ == "__main__":
  main()
